Constraint-Based Refactoring with Foresight
نویسندگان
چکیده
Constraint-based refactoring tools as currently implemented generate their required constraint sets from the programs to be refactored, before any changes are performed. Constraint generation is thus unable to see — and regard — the changed structure of the refactored program, although this new structure may give rise to new constraints that need to be satisfied for the program to maintain its original behaviour. To address this problem, we present a framework allowing the constraint-generation process to foresee all changes a refactoring might perform, generating — at the outset of the refactoring — all constraints necessary to constrain these changes. As we are able to demonstrate, the computational overhead imposed by our framework, although threatening viability in theory, can be reduced to tractable sizes.
منابع مشابه
A Refactoring Constraint Language and Its Application to Eiffel
We generalize previous work on constraint-based refactoring and develop it into the definition of a constraint language allowing the specification of refactorings in a completely declarative way. We present a compiler that transforms specifications in our language to plug-ins for an IDE that, together with an accompanying framework providing the necessary infrastructure, implement the specified...
متن کاملConflict-aware optimal scheduling of prioritised code clone refactoring
Duplicated or similar source code, also known as code clones, are possible malicious ‘code smells’ that may need to be removed through refactoring to enhance maintainability. Among many potential refactoring opportunities, the choice and order of a set of refactoring activities may have distinguishable effect on the design/code quality measured in terms of software metrics. Moreover, there may ...
متن کاملOCL as a Constraint Generation Language
In programming as well as in modelling, artefacts are required to comply with the rules of well-formedness given by their underlying language definition or their meta model, respectively. In many cases (e.g. the UML specification or the meta models implemented with EMF), these rules are given as Boolean typed OCL expressions, whose evaluation results indicate whether an artefact is well-formed....
متن کاملFirst Results on the Evolutionary Solution for the Strategy- based Refactoring Set Selection Problem
In order to improve the internal structure of object-oriented software, refactoring has proved to be a feasible technique. Scheduling a refactoring process for a complex software system is a difficult task to do. Refactorings may be organized and prioritized based on goals established by the project management leadership, that shapes a refactoring strategy. The paper presents a multi-objective ...
متن کاملFormal Refactoring for UML Class Diagrams
Refactoring UML models for evolution is usually carried out in an ad hoc way. These transformations can become an issue, since it is hard to ensure that the semantics of models is preserved. We provide a set of semantics-preserving transformations for UML class diagrams annotaded with OCL. Using the proposed transformations, software designers can safely define larger transformations and detect...
متن کامل